/*
 * Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved.
 *
 * https://www.mall4j.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */
import { defineStore } from 'pinia'
export const useCategoryHorizontalStore = defineStore('categoryHorizontal', {
  state: () => {
    return {
      parentCategoryList: [], // 一级分类
      categoryList: [], // 二级分类
      thCategoryList: [] // 三级分类
    }
  },
  actions: {
    initParentCategoryList (parentCategoryList) {
      this.parentCategoryList = parentCategoryList
    },
    reomveParentCategoryList () {
      this.parentCategoryList = []
    },
    initCategoryList (categoryList) {
      this.categoryList = categoryList
    },
    initThCategoryList (thCategoryList) {
      this.thCategoryList = thCategoryList
    },
    reomveCategoryList () {
      this.categoryList = []
    },
    reomveThCategoryList () {
      this.thCategoryList = []
    }
  }
})
